#include "MeshBatch.h"

#include "PrimitiveSceneInfo.h"

namespace Alice
{
    FMeshBatch::FMeshBatch()
    {
    }
    FStaticMeshBatch::FStaticMeshBatch(PrimitiveSceneInfo* inPrimitiveSceneInfo, const FMeshBatch& inMeshBatch)
        :FMeshBatch(inMeshBatch),mPrimitiveSceneInfo(inPrimitiveSceneInfo)
    {
        
    }
    int32 FStaticMeshBatchRelevance::GetStaticMeshCommandInfoIndex(EMeshPass::Type MeshPass) const
    {
        return 0;
    }

    void FBatchingSPDI::ReserveMemoryForMeshes(int32 inMeshNum)
    {
        mPrimitiveSceneInfo->mStaticMeshRelevances.reserve(inMeshNum);
        mPrimitiveSceneInfo->mStaticMeshes.reserve(inMeshNum);
    }
    void FBatchingSPDI::DrawMesh(const FMeshBatch& inMesh, float inScreenSize)
    {
        FStaticMeshBatch*staticMeshBatch=new FStaticMeshBatch(mPrimitiveSceneInfo,inMesh);
        mPrimitiveSceneInfo->mStaticMeshes.push_back(staticMeshBatch);
        FStaticMeshBatchRelevance*staticMeshBatchRelevance=new FStaticMeshBatchRelevance;
        mPrimitiveSceneInfo->mStaticMeshRelevances.push_back(staticMeshBatchRelevance);
    }
}
